package com.supreme.cacheserver.annotation;

import java.lang.annotation.*;
import java.util.concurrent.TimeUnit;

@Retention(RetentionPolicy.RUNTIME)
@Target(value = {ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER})
@Documented
public @interface RedisLock {

    String name() default "";

    String lockKey() default "";

    String keyPrefix() default "";

    String keySep() default "";

    long waitTime() default 0;

    long leaseTime() default 0;

    TimeUnit timeUnit() default TimeUnit.SECONDS;

    boolean tryLock() default false;
}
